﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.doobers {
    import Engine.Classes.*;
    import flash.events.*;
    import flash.display.*;
    import flash.geom.*;
    import Classes.*;
    import Classes.util.*;
    import Classes.effects.*;
    import com.greensock.*;
    import Display.*;
    import GameMode.*;
    import Display.Toaster.*;
    import Classes.gates.*;
    import Display.hud.components.*;
    import Engine.*;
    import Display.hud.*;
    import com.greensock.easing.*;

    public class Doober extends MapResource {

        public static const STATE_INITIAL:String = "initial";
        public static const STATE_IDLE:String = "idle";
        public static const STATE_END:String = "end";
        public static const DOOBER_COIN:String = "coin";
        public static const DOOBER_XP:String = "xp";
        public static const DOOBER_ENERGY:String = "energy";
        public static const DOOBER_CASH:String = "cash";
        public static const DOOBER_COLLECTABLE:String = "collectable";
        public static const DOOBER_GOODS:String = "goods";
        public static const DOOBER_PREMIUM_GOODS:String = "premium_goods";
        public static const DOOBER_REP:String = "rep";
        public static const DOOBER_ITEM:String = "item";
        public static const DOOBER_POPULATION:String = "population";
        public static const DOOBER_TOOL:String = "tool";
        public static const CLEAR_EVENT:String = "clear";

        protected const DOOBER:String = "doober";
        protected const DOOBER_GRAVITY:Number = 2;

        protected var m_dooberTimeout:int;
        protected var m_amount:int;
        private var m_arcMotion:ArcMotion;
        protected var m_dooberElapsedTime:Number = 0;
        protected var m_startPosition:Point;
        protected var m_landPosition:Point;
        protected var m_initialYVelocity:Number;
        private var m_doneCompleteAnimation:Boolean = false;
        private var m_finalAnimationStartFrame:Number = 0;
        private var m_startedFinalAnimation:Boolean = false;
        protected var m_streakAmount:int;
        protected var m_collectableFlyToPoint:Point;
        protected var m_collectableFlyToSize:Point;
        protected var m_timedOut:Boolean = false;
        protected var m_pixieDustAdded:Boolean = false;
        protected var m_zoom:Number;
        protected var m_isDummy:Boolean;
        protected var m_flyToScreenPoint:Point;
        protected var m_isFlying:Boolean = false;
        private var m_dooberDiedTimestamp:int;
        private var m_dooberSquashStretching:Boolean = false;
        protected var m_isStreakBonusEnabled:Boolean = true;
        protected var m_onCollectCallback:Function;
        protected var m_batchId:int = -1;
        protected var m_spawningObject:MapResource = null;

        public function Doober(_arg1:MapResource, _arg2:String, _arg3:int, _arg4:Item, _arg5:Point, _arg6:Point, _arg7:Number, _arg8:int, _arg9:Boolean=false, _arg10:Point=null, _arg11:Function=null, _arg12:int=-1){
            super(_arg2);
            this.m_batchId = _arg12;
            this.m_amount = _arg3;
            this.m_startPosition = _arg5;
            this.m_landPosition = _arg6;
            this.m_initialYVelocity = _arg7;
            this.m_dooberTimeout = _arg8;
            m_typeName = this.DOOBER;
            m_objectType = WorldObjectTypes.DOOBER;
            m_collisionFlags = Constants.COLLISION_NONE;
            m_ownable = false;
            this.m_streakAmount = _arg3;
            this.m_isDummy = _arg9;
            this.m_flyToScreenPoint = _arg10;
            this.m_zoom = GlobalEngine.viewport.getZoom();
            this.m_onCollectCallback = _arg11;
            this.m_spawningObject = _arg1;
            this.setState(STATE_INITIAL);
            if (m_item.type == DOOBER_XP){
                this.doResourceChanges(0, 0, this.m_amount, 0, "", false, true, false);
            } else {
                if (m_item.type == DOOBER_ENERGY){
                    this.doEnergyChanges(this.m_amount, this.getEnergyTrackingInfo(_arg4));
                };
            };
        }
        private function getEnergyTrackingInfo(_arg1:Item):Array{
            var _local3:String;
            var _local2:Array = new Array("energy", "expenditures", "unknown_doober", "unknown_item");
            if (_arg1 != null){
                _local3 = _arg1.name;
                if (_local3.indexOf("mun") >= 0){
                    _local2[2] = "municipal_drops";
                } else {
                    _local2[2] = "random_drops";
                };
                _local2[3] = _local3;
            };
            return (_local2);
        }
        override protected function getLayerName():String{
            return ("doober");
        }
        public function get amount():int{
            return (this.m_amount);
        }
        public function get isFlying():Boolean{
            return (this.m_isFlying);
        }
        public function get isStreanBonusEnabled():Boolean{
            return (this.m_isStreakBonusEnabled);
        }
        public function set isStreanBonusEnabled(_arg1:Boolean):void{
            this.m_isStreakBonusEnabled = _arg1;
        }
        override protected function onItemImageLoaded(_arg1:Event):void{
            super.onItemImageLoaded(_arg1);
            GlobalEngine.viewport.setDirty();
        }
        override public function onUpdate(_arg1:Number):void{
            var _local2:Number;
            var _local3:Number;
            var _local4:int;
            if (((!(displayObject)) || (!(m_content)))){
                return;
            };
            if (((!(this.m_pixieDustAdded)) && (displayObject))){
                if (Global.world.defCon == GameWorld.DEFCON_LEVEL1){
                    this.addAnimatedEffect(EffectType.PIXIEDUST);
                };
                this.m_pixieDustAdded = true;
            };
            if (((!(this.m_arcMotion)) && (!(this.m_isDummy)))){
                this.m_arcMotion = new ArcMotion(this, this.m_startPosition, this.m_landPosition, this.m_initialYVelocity, this.DOOBER_GRAVITY);
            };
            if (((this.m_isDummy) && ((this.getState() == STATE_INITIAL)))){
                this.setState(STATE_END);
                this.m_dooberDiedTimestamp = int((GlobalEngine.getTimer() / 1000));
                this.playCollectAnimation();
                return;
            };
            if (((this.m_arcMotion) && ((this.getState() == STATE_INITIAL)))){
                if (Global.world.defCon >= GameWorld.DEFCON_LEVEL4){
                    _arg1 = 10;
                };
                this.m_arcMotion.update(_arg1);
                if (this.m_arcMotion.isComplete){
                    this.setState(STATE_IDLE);
                    if (Global.world.defCon < GameWorld.DEFCON_LEVEL3){
                        this.m_dooberSquashStretching = true;
                        _local2 = ((displayObject.width * Math.abs((1 - (0.3 / displayObject.scaleX)))) / 2);
                        _local3 = (displayObject.height * Math.abs((1 - (0.15 / displayObject.scaleY))));
                        TweenLite.to(displayObject, 0.1, {
                            scaleX:(this.originalScale * 1.2),
                            scaleY:(this.originalScale * 0.6),
                            x:(displayObject.x - _local2),
                            y:(displayObject.y + _local3),
                            onComplete:this.onSquash
                        });
                    };
                };
            } else {
                if (this.getState() == STATE_IDLE){
                    if (((!(UI.isModalDialogOpen)) && ((this.m_dooberElapsedTime < this.m_dooberTimeout)))){
                        this.m_dooberElapsedTime = (this.m_dooberElapsedTime + (_arg1 * 1000));
                    };
                    if (this.m_dooberElapsedTime >= this.m_dooberTimeout){
                        this.onTimeOut();
                    };
                } else {
                    if (this.getState() == STATE_END){
                        _local4 = (int((GlobalEngine.getTimer() / 1000)) - this.m_dooberDiedTimestamp);
                        if (_local4 > 5){
                            this.cleanUp();
                        };
                    };
                };
            };
            if (this.getState() != STATE_END){
                this.resetZoom();
            };
            super.onUpdate(_arg1);
        }
        protected function resetZoom():void{
            if (displayObject){
                this.m_zoom = GlobalEngine.viewport.getZoom();
                displayObject.scaleX = (1 / this.m_zoom);
                displayObject.scaleY = (1 / this.m_zoom);
            };
        }
        private function onSquash():void{
            var _local1:Number = ((displayObject.width * Math.abs((1 - (this.originalScale / displayObject.scaleX)))) / 2);
            var _local2:Number = (displayObject.height * Math.abs((1 - (this.originalScale / displayObject.scaleY))));
            TweenLite.to(displayObject, 0.1, {
                scaleX:this.originalScale,
                scaleY:this.originalScale,
                x:(displayObject.x + _local1),
                y:(displayObject.y - _local2),
                onComplete:this.onStretch
            });
        }
        private function onStretch():void{
            this.m_dooberSquashStretching = false;
        }
        override public function onPlayAction():void{
            if (((!(this.m_dooberSquashStretching)) && ((((this.getState() == STATE_IDLE)) || ((this.getState() == STATE_INITIAL)))))){
                this.setState(STATE_END);
                this.m_dooberDiedTimestamp = int((GlobalEngine.getTimer() / 1000));
                this.collectDoober(true);
                this.playCollectAnimation();
            };
        }
        function collectIfIdle():void{
            if (getState() == STATE_IDLE){
                this.onPlayAction();
            };
        }
        private function onTimeOut():void{
            this.setState(STATE_END);
            this.m_dooberDiedTimestamp = int((GlobalEngine.getTimer() / 1000));
            this.m_timedOut = true;
            this.collectDoober(false, false);
            this.playCollectAnimation();
        }
        protected function collectDoober(_arg1:Boolean, _arg2:Boolean=true):void{
            var _local3:int;
            var _local4:String;
            switch (m_item.type){
                case DOOBER_COIN:
                    this.doResourceChanges(0, this.m_amount, 0, 0, "", _arg1, true, false);
                    if (_arg2){
                        Sounds.play("doober_coin_click");
                    };
                    break;
                case DOOBER_XP:
                    this.doResourceChanges(0, 0, this.m_amount, 0, "", _arg1, false, false);
                    if (_arg2){
                        Sounds.play("doober_xp_click");
                    };
                    break;
                case DOOBER_ENERGY:
                    this.doEnergyChanges(this.m_amount, null, _arg1, false, false);
                    if (_arg2){
                        Sounds.play("doober_energy_click");
                    };
                    break;
                case DOOBER_GOODS:
                    Global.player.commodities.add(DOOBER_GOODS, this.m_amount);
                    this.doResourceChanges(0, 0, 0, this.m_amount, DOOBER_GOODS, _arg1, true, false);
                    if (_arg2){
                        Sounds.play("doober_food_click");
                    };
                    break;
                case DOOBER_PREMIUM_GOODS:
                    Global.player.commodities.add(DOOBER_PREMIUM_GOODS, this.m_amount);
                    this.doResourceChanges(0, 0, 0, this.m_amount, DOOBER_PREMIUM_GOODS, _arg1, true, false);
                    if (_arg2){
                        Sounds.play("doober_food_click");
                    };
                    break;
                case DOOBER_POPULATION:
                    if (_arg2){
                        Sounds.play("doober_population_click");
                    };
                    if (_arg1){
                        _local3 = (this.m_amount * Global.gameSettings.getNumber("populationScale", 1));
                        _local4 = ZLoc.t("Main", "GainPop", {population:_local3});
                        this.displayStatus(_local4, null);
                    };
                    break;
                case DOOBER_REP:
                    this.doResourceChanges(0, 0, 0, 0, "", _arg1, true, false, this.m_amount);
                    if (_arg2){
                        Sounds.play("doober_reputation_click");
                    };
                    break;
                case DOOBER_COLLECTABLE:
                    if (_arg2){
                        Sounds.play("doober_collectable_click");
                    };
                    this.displayStatus(m_item.localizedName);
                    this.m_collectableFlyToPoint = new Point();
                    this.m_collectableFlyToSize = new Point();
                    UI.displayCollectionFlyout(m_item.name, this.m_collectableFlyToPoint, this.m_collectableFlyToSize);
                    break;
                default:
                    if (((m_item) && (m_item.getImageByName("initial")))){
                        Global.player.inventory.addItems(m_item.name, 1);
                    };
            };
        }
        private function playCollectAnimation():void{
            var _local3:HUDComponent;
            var _local7:Point;
            var _local8:Point;
            var _local9:Point;
            this.passDooberToUI();
            var _local1:Number = 0;
            var _local2:Number = 0;
            var _local4:Function = Cubic.easeOut;
            var _local5:Function = this.onLandedAtDummyFlyPoint;
            if (((this.m_isDummy) && (this.m_flyToScreenPoint))){
                _local7 = ((displayObject.parent)!=null) ? displayObject.parent.globalToLocal(this.m_flyToScreenPoint) : this.m_flyToScreenPoint;
                _local1 = (_local7.x - (m_content.width / 2));
                _local2 = (_local7.y - (m_content.height / 2));
                _local5 = this.onLandedAtDummyFlyPoint;
                TweenLite.to(displayObject, 0.5, {
                    bezier:[{
                        x:_local1,
                        y:displayObject.y
                    }, {
                        x:_local1,
                        y:_local2
                    }],
                    orientToBezier:false,
                    ease:_local4,
                    onComplete:_local5
                });
                return;
            };
            var _local6:Number = 0.5;
            if (Global.world.defCon >= GameWorld.DEFCON_LEVEL3){
                _local6 = 0.1;
            };
            _local1 = (Global.hud.streakBonus.midPointX - (m_content.width / 2));
            _local2 = (Global.hud.streakBonus.midPointY - (m_content.height / 2));
            _local5 = this.onLandedAtHudBar;
            switch (m_item.type){
                case DOOBER_COIN:
                    _local3 = Global.hud.getComponent(HUD.COMP_COINS);
                    if (_local3 == null){
                        break;
                    };
                    _local1 = (_local3.x - 10);
                    _local2 = (_local3.y - 10);
                    _local5 = this.onLandedAtHudBar;
                    break;
                case DOOBER_XP:
                    _local3 = Global.hud.getComponent(HUD.COMP_XP);
                    if (_local3 == null){
                        break;
                    };
                    _local1 = (_local3.x + 80);
                    _local2 = (_local3.y - 5);
                    _local5 = this.onLandedAtHudBar;
                    break;
                case DOOBER_ENERGY:
                    _local3 = Global.hud.getComponent(HUD.COMP_ENERGY);
                    if (_local3 == null){
                        break;
                    };
                    _local1 = _local3.x;
                    _local2 = _local3.y;
                    _local5 = this.onLandedAtHudBar;
                    break;
                case DOOBER_GOODS:
                case DOOBER_PREMIUM_GOODS:
                    _local8 = Global.hud.hudGoodsPosition;
                    if ((((_local8.x == 0)) && ((_local8.y == 0)))){
                        break;
                    };
                    _local1 = (_local8.x - 10);
                    _local2 = ((_local8.y + Global.hud.hudGoodsHeight) - 110);
                    _local5 = this.onLandedAtHudBar;
                    break;
                case DOOBER_REP:
                    _local3 = Global.hud.getComponent(HUD.COMP_REPUTATION);
                    if (_local3 == null){
                        break;
                    };
                    _local1 = _local3.x;
                    _local2 = _local3.y;
                    _local5 = this.onLandedAtHudBar;
                    break;
                case DOOBER_POPULATION:
                    if ((this.m_spawningObject is Residence)){
                        (this.m_spawningObject as Residence).playMoveIn();
                    } else {
                        Global.world.citySim.recomputePopulation(Global.world, true);
                    };
                    _local9 = Global.ui.m_cityNamePanel.localToGlobal(new Point(0, 0));
                    _local9 = Global.ui.globalToLocal(_local9);
                    _local1 = _local9.x;
                    _local2 = _local9.y;
                    _local5 = this.onLandedAtNamePanel;
                    break;
                case DOOBER_COLLECTABLE:
                    _local1 = ((this.m_collectableFlyToPoint.x - (m_content.width / 2)) + (this.m_collectableFlyToSize.x / 2));
                    _local2 = ((this.m_collectableFlyToPoint.y - (m_content.height / 2)) + (this.m_collectableFlyToSize.y / 2));
                    _local5 = this.onLandedAtSlideOut;
                    break;
                default:
                    _local1 = (Global.hud.streakBonus.midPointX - (m_content.width / 2));
                    _local2 = (Global.hud.streakBonus.midPointY - (m_content.height / 2));
                    _local5 = this.onLandedAtHudBar;
            };
            TweenLite.to(displayObject, _local6, {
                bezier:[{
                    x:_local1,
                    y:displayObject.y
                }, {
                    x:_local1,
                    y:_local2
                }],
                orientToBezier:false,
                ease:_local4,
                onComplete:_local5
            });
        }
        private function passDooberToUI():void{
            var _local1:Point;
            if (!this.m_isDummy){
                _local1 = displayObject.parent.localToGlobal(new Point(displayObject.x, displayObject.y));
            } else {
                _local1 = this.m_startPosition;
            };
            this.m_isFlying = true;
            var _local2:GameMode = Global.world.getTopGameMode();
            var _local3:Point = Global.ui.globalToLocal(_local1);
            displayObject.x = _local3.x;
            displayObject.y = _local3.y;
            displayObject.scaleX = 1;
            displayObject.scaleY = 1;
            this.detach();
            Global.ui.addChild(displayObject);
            (displayObject as DisplayObjectContainer).mouseEnabled = false;
            (displayObject as DisplayObjectContainer).mouseChildren = false;
        }
        override public function getGameModeToolTipAction():String{
            var _local1:String = super.getGameModeToolTipAction();
            if ((Global.world.getTopGameMode() is GMEditSell)){
                _local1 = null;
            };
            return (_local1);
        }
        private function onLandedAtDummyFlyPoint():void{
            TweenLite.to(displayObject, 0.3, {
                scaleX:(displayObject.scaleX * 1.2),
                scaleY:(displayObject.scaleY * 1.2),
                alpha:0,
                onComplete:this.cleanUp
            });
        }
        private function onLandedAtHudBar():void{
            if (((!(this.m_timedOut)) && (this.m_isStreakBonusEnabled))){
                Global.hud.streakBonus.incProgress(this.m_streakAmount);
            };
            TweenLite.to(displayObject, 0.3, {
                scaleX:(displayObject.scaleX * 1.2),
                scaleY:(displayObject.scaleY * 1.2),
                alpha:0,
                onComplete:this.cleanUp
            });
        }
        private function onLandedAtNamePanel():void{
            if (((!(this.m_timedOut)) && (this.m_isStreakBonusEnabled))){
                Global.hud.streakBonus.incProgress(this.m_streakAmount);
            };
            Global.ui.happinessPanel.animateIfHappinessChanged();
            Global.world.citySim.recomputePopulation(Global.world, true);
            TweenLite.to(displayObject, 0.3, {
                scaleX:(displayObject.scaleX * 1.2),
                scaleY:(displayObject.scaleY * 1.2),
                alpha:0,
                onComplete:this.cleanUp
            });
        }
        private function onLandedAtSlideOut():void{
            if (this.m_isStreakBonusEnabled){
                Global.hud.streakBonus.incProgress(this.m_streakAmount);
            };
            UI.checkCollectableFadeIn(m_item.name);
            var _local1:Number = (displayObject.width * 0.2);
            var _local2:Number = (displayObject.height * 0.2);
            TweenLite.to(displayObject, 0.1, {
                scaleX:(displayObject.scaleX * 1.2),
                scaleY:(displayObject.scaleY * 1.2),
                x:(displayObject.x - _local1),
                y:(displayObject.y - _local2),
                delay:0.4,
                onComplete:this.onCollectableEnlarged
            });
        }
        private function onCollectableEnlarged():void{
            var _local1:Number = (this.m_collectableFlyToSize.x / m_content.width);
            var _local2:Number = (this.m_collectableFlyToSize.y / m_content.height);
            TweenLite.to(displayObject, 0.2, {
                scaleX:_local1,
                scaleY:_local2,
                x:this.m_collectableFlyToPoint.x,
                y:this.m_collectableFlyToPoint.y,
                onComplete:this.onCollectableShrunk
            });
        }
        private function onCollectableShrunk():void{
            Collection.addCollectionToPlayer(m_item.name);
            UI.displayCollectableFadeIn(m_item.name);
            this.cleanUp();
        }
        override public function cleanUp():void{
            if (this.m_onCollectCallback != null){
                this.m_onCollectCallback();
            };
            this.dispatchEvent(new DooberEvent(Doober.CLEAR_EVENT, this.m_batchId));
            if (this.isAttached()){
                this.detach();
            };
            if (displayObject){
                if (displayObject.parent){
                    displayObject.parent.removeChild(displayObject);
                };
                TweenLite.killTweensOf(displayObject);
            };
            Global.world.dooberManager.removeDoober(this);
            super.cleanUp();
        }
        override public function displayStatus(_arg1:String, _arg2:Object="", _arg3:Object=0xFFFFFF):void{
            var _local4:Point = displayStatusStartPos();
            UI.displayStatus(_arg1, _local4.x, _local4.y, _arg2, null, 1.5, 32, 16, 60, _arg3);
        }
        override public function getToolTipHeader():String{
            return (null);
        }
        override public function setState(_arg1:String):void{
            var _local2:String = m_state;
            m_state = _arg1;
            onStateChanged(_local2, _arg1);
            if (((!((_local2 == _arg1))) && ((_arg1 == STATE_IDLE)))){
                this.checkToaster();
            };
        }
        private function getCanComplete(_arg1:WorldObject):Boolean{
            if (!(_arg1 is ConstructionSite)){
                return (false);
            };
            var _local2:ConstructionSite = (_arg1 as ConstructionSite);
            var _local3:IGate = _local2.getGate(ConstructionSite.BUILD_GATE);
            if (_local3 == null){
                return (false);
            };
            if (_local2.currentState != ConstructionSite.STATE_AT_GATE){
                return (false);
            };
            if (!(_local3 is InventoryGate)){
                return (false);
            };
            var _local4:InventoryGate = (_local3 as InventoryGate);
            if (_local4.checkForKeys()){
                return (true);
            };
            if (_local4.checkWithAdditionalKey(m_item)){
                return (true);
            };
            return (false);
        }
        protected function checkMunicipal():void{
            var _local5:ConstructionSite;
            var _local6:InventoryGate;
            var _local7:Boolean;
            var _local8:int;
            var _local9:Item;
            var _local10:ItemToaster;
            var _local1:Array = Global.world.getObjectsByPredicate(this.getCanComplete);
            var _local2:ConstructionSite;
            var _local3:int;
            var _local4 = 100;
            for each (_local5 in _local1) {
                _local6 = (_local5.getGate(ConstructionSite.BUILD_GATE) as InventoryGate);
                if (_local6 == null){
                } else {
                    _local7 = ((_local6.checkWithAdditionalKey(m_item)) && (!(_local6.checkForKeys())));
                    _local8 = _local6.keyCount;
                    if (_local7){
                        _local8 = (_local8 + _local4);
                    };
                    if (_local8 > _local3){
                        _local2 = _local5;
                        _local3 = _local8;
                    };
                };
            };
            if (_local2){
                _local9 = _local2.targetItem;
                _local10 = new ItemToaster(ZLoc.t("Main", "CommunityToasterTitle"), ZLoc.t("Main", "CommunityToasterText", {building:_local9.localizedName}), _local9.getImageByName("icon"));
                Global.ui.toaster.show(_local10);
            };
        }
        protected function checkToaster():void{
            var _local2:String;
            var _local3:ItemToaster;
            var _local1:String = m_item.type;
            if (_local1 != DOOBER_TOOL){
                return;
            };
            if (((this.m_spawningObject) && ((this.m_spawningObject.getItemName() == "bus_hardwarestore")))){
                _local2 = "";
                if (((m_item) && (m_item.getImageByName("initial")))){
                    _local2 = m_item.localizedName;
                };
                if (_local2 == ""){
                    return;
                };
                _local3 = new ItemToaster(ZLoc.t("Main", "HardwareDeliveryToasterTitle"), ZLoc.t("Main", "HardwareDeliveryToasterText", {itemName:_local2}), m_item.getImageByName("icon"));
                Global.ui.toaster.show(_local3);
                this.checkMunicipal();
            };
        }
        override public function canBeDragged():Boolean{
            return (false);
        }
        override public function isPixelInside(_arg1:Point):Boolean{
            var _local2:Rectangle;
            if (m_displayObject){
                _local2 = m_displayObject.getBounds(m_displayObject.parent);
                if (m_state != STATE_END){
                    _local2.topLeft.x = (_local2.topLeft.x - 5);
                    _local2.topLeft.y = (_local2.topLeft.y - 5);
                    _local2.bottomRight.x = (_local2.bottomRight.x + 5);
                    _local2.bottomRight.y = (_local2.bottomRight.y + 5);
                    if (_local2.containsPoint(_arg1)){
                        return (true);
                    };
                };
            };
            return (false);
        }
        protected function get originalScale():Number{
            return ((1 / this.m_zoom));
        }

    }
    var _local1:* = TweenPlugin.activate([BezierPlugin]);
    return (_local1);
}//package Classes.doobers 
